package cn.yunyichina.provider.framework.dubbo.service;

import cn.yunyichina.provider.framework.data.SpringContextHandler;
import cn.yunyichina.provider.iface.entity.common.Response;
import cn.yunyichina.provider.iface.entity.common.ResponseObject;
import cn.yunyichina.provider.iface.service.IPay;

public class PayService {

    static final String serviceName = "payService";

    static IPay payService = null;

    static {
        payService = SpringContextHandler.getBean(serviceName);
    }

    public static IPay getPayClient() {
        return payService;
    }

    public static Response callUnderlineFromInternal(String method, String data) {
        return payService.callUnderlineFromInternal("", method, data, (short) 0);
    }

    public static Response callUnderlineFromInternal(String sessionId, String method, String data) {
        return payService.callUnderlineFromInternal(sessionId, method, data, (short) 0);
    }

    public static Response callHumpFromInternal(String sessionId, String method, String data) {
        return payService.callHumpFromInternal(sessionId, method, data, (short) 0);
    }

    public static Response callHumpFromInternal(String method, String data) {
        return payService.callHumpFromInternal("", method, data, (short) 0);
    }

    public static ResponseObject callUnderlineFromInternalObject(String method, String data) {
        return payService.callUnderlineFromInternalObject("", method, data, (short) 0);
    }

}
